<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../css/lof-ass.css" />
<script type="text/javascript" src="../javascript/mootools.js"></script>
<script type="text/javascript" src="../javascript/modal.js"></script>
<script type="text/javascript" language="JavaScript" src="../javascript/caption.js"></script>
<script type="text/javascript" language="JavaScript" src="../javascript/lof.js"></script>

<div id="lofass43" class="lof-ass " style="height:auto; width:auto"><div class="lofass-container  lof-css3  lof-snright">
<div class="preload"><div></div></div>
<div class="lof-main-wapper" ><?php
	include_once('../common/init.php');
	global $db;
	include_once(DIR_MODEL."md_quang_cao.class.php");
	$objModelQuangcao = new MD_Quangcao($db);
	$arrayDataQuangcao = $objModelQuangcao -> getByWhereLimit("*","hien_thi = 1","ngay_dang desc limit 5");
	foreach($arrayDataQuangcao as $rowQC)
	{
?>
<div class="lof-main-item">
	<img width="580px" height="275px" src="<?=DIR_IMAGES_VIEW_QUANG_CAO.$rowQC['anh_dai_dien']?>" />
	<div class="lof-description">
		<h4>
			<?
			if(!empty($rowQC["idlink"])){
			?>
			<a href="http://<?=$_SERVER['SERVER_NAME']?>/run/main.php?modul=tintuc&action=View&id=<?=$rowQC["idlink"]?>" target="_parent"><?=$rowQC["ten_doi_tac"]?></a>
			<?
			}else{
			?>
			<a style="cursor:pointer; "><?=$rowQC["ten_doi_tac"]?></a>
			<?
			}
			?>
		</h4>
		<p><?=$rowQC["ghi_chu"]?></p>
	</div><!-- lof-description -->
</div><!-- lof-main-item -->
<?
		
	}
?></div>
<div class="lof-buttons-control"><a href="javascript:void(0)" class="lof-previous"></a><a href="javascript:void(0)" class="lof-next"></a></div>
<div class="lof-navigator-outer"><ul class="lof-navigator"><?php
	foreach($arrayDataQuangcao as $rowQC)
	{
		echo "<li><div><img width=\"200px\" height=\"66px\" src=\"".DIR_IMAGES_VIEW_QUANG_CAO.$rowQC['anh_dai_dien']."\" /></div></li>";
	}
?></ul></div></div></div>
<script type="text/javascript">
	var _lofmain =  $('lofass43');
	_lofmain.getElements('.lof-description').setStyle("opacity",0.8 );
	var object = new LofSlideshow(  _lofmain.getElement('.lof-main-wapper'), 
					  	  _lofmain.getElement('.lof-navigator-outer .lof-navigator'),
					  	  _lofmain.getElement('.lof-navigator-outer'),
						  { 
							  fxObject:{
										transition:Fx.Transitions.Quad.easeInOut,  
										duration:500									  },
							  interval:5000,
							  direction :'vrdown', 
							  navItemHeight:69,
							  navItemWidth:220,
							  navItemsDisplay:4						  } );

		object.registerButtonsControl( 'click', {next:_lofmain.getElement('.lof-next'),
												 previous:_lofmain.getElement('.lof-previous')} );
			object.start( 1, _lofmain.getElement('.preload') );

</script>